class TpshopLoginAPI:
    # 获取验证码方法
    @classmethod
    def get_verify_code(cls, session):
        session.get(url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify")

    # 登录方法
    @classmethod
    def login(cls, session, data):
        url = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login"
        header = {"Content-Type": "application/x-www-form-urlencoded"}
        resp = session.post(url=url, data=data, headers=header)
        return resp